#pragma once
#include <afxwin.h>
/**
 * IDS:
 *	404 - not found
 *  403 - Access forbidden
 *  500 - Internal DB Error
 */

class CBaseException {
	private:
		int m_ErrorID;
		char m_ErrorText[32];

	public:
		/**
		 * Constructors
		 */
		CBaseException( void ) {
			this->m_ErrorID = 0;
			memset( this->m_ErrorText, 0, sizeof(this->m_ErrorText) );
		}

		CBaseException( int error_id, const char* error_text ) {
			this->m_ErrorID = error_id;
			memcpy( this->m_ErrorText, error_text, sizeof(this->m_ErrorText)-1 );
		}

		/**
		 * E-handling stuff
		 */
		const char* GetErrorTextChar( void ) const {
			return this->m_ErrorText;
		}

		int GetErrorID( void ) const {
			return this->m_ErrorID;
		}

		LPCTSTR GetErrorText( void ) const {
			return CString( this->m_ErrorText );
		}
};